package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-10-10
 * Time: 0:10
 */
public class demo4 {
    public static void main1(String[] args) {
        Runnable t = new Runnable() {
            @Override
            public void run() {

                    while (true) {

                        System.out.println("这⾥是线程运⾏的代码");

                        try {
                            Thread.sleep(1000);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
            }
        };
    }
}
